package com.xiamo.socket;

import java.net.InetAddress;

/**
 * 
 *
 * @author Richard - rui.wu@bitmain.com
 * @since 2016年7月21日 
 *
 */
public class Address {
	public static void main(String[] args) {
		InetAddress ip;
		try {
			ip = InetAddress.getLocalHost();
			System.out.println("主机名："+ip.getHostName());
			System.out.println("主机ip:"+ip.getHostAddress());
		} catch (Exception e) {
			// TODO: handle exception
		}
	}
}
